package com.fr.plugin.export.xml.core;

import com.fr.form.ui.Widget;
import com.fr.js.JavaScriptImpl;
import com.fr.locale.InterProviderFactory;
import com.fr.report.fun.impl.AbstractExtensionButton;
import com.fr.stable.web.Repository;


public class XmlExtensionButton extends AbstractExtensionButton {

    public XmlExtensionButton() {
        super(InterProviderFactory.getProvider().getLocText("Plugin-Xml_Export"), IconLoader.loadIcon());
    }

    public XmlExtensionButton(String text) {
        super(text);
    }

    public XmlExtensionButton(String text, String iconName) {
        super(text, iconName);
    }

    @Override
    public Class<? extends Widget> classForDirectoryButton() {
        return this.getClass();
    }

    @Override
    public String getParentDirectory() {
        return null;
    }

    @Override
    public String getType() {
        return "XmlExport.class";
    }

    @Override
    public String getRelatedCheckBoxTitle() {
        return null;
    }

    @Override
    public boolean isSelected() {
        return false;
    }

    @Override
    public void setSelected(boolean isSelected) {

    }

    @Override
    protected JavaScriptImpl clickAction(Repository repo) {
        return new JavaScriptImpl("_g().exportReportToXML()");
    }
}